#ifndef TRANSLATIONRULESFORM_H
#define TRANSLATIONRULESFORM_H

#include <QWidget>

namespace Ui {
    class TranslationRulesForm;
}
class TranslationRules;
class QItemDelegate;
class QStyledItemDelegate;

class TranslationRulesForm : public QWidget {
    Q_OBJECT
public:
    TranslationRulesForm(QWidget *parent = 0);
    ~TranslationRulesForm();
public slots:
    void setTranslationRules(TranslationRules *rules);
    void addSkipRule();
    void removeSkipRule();
    void addReplaceRule();
    void removeReplaceRule();
    void moveUpReplaceRule();
    void moveDownReplaceRule();
protected:
    void changeEvent(QEvent *e);
protected slots:
    void onNameChanged(const QString& name);
    void onSkipedListChanged(const QString& skipedList);
private:
    Ui::TranslationRulesForm *ui;
    TranslationRules *m_rules;
    QStyledItemDelegate* m_skipRulesDelegate;
    QItemDelegate* m_replaceRulesDelegate;
};

#endif // TRANSLATIONRULESFORM_H
